import sys
import os
import jieba

BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
sys.path.append(BASE_DIR + r"\sql")
import mongo



def analysisSummary():
    pageSize = 100
    for i in range(1, 10000):
        skip = i * pageSize
        limit = pageSize
        params = {"classify": "股票"}
        list = mongo.select_any(params, skip, limit)
        for a in list:
            asd = jieba.cut(a["summary"], cut_all=False)
            print(",".join(asd))


if __name__ == "__main__":
    analysisSummary()
